Skip to content

Add custom action type to volume policies#9540

Open
sseago wants to merge 4 commits intovmware-tanzu:mainfrom
sseago:custom-volume-policy
Open

Add custom action type to volume policies#9540
sseago wants to merge 4 commits intovmware-tanzu:mainfrom
sseago:custom-volume-policy

Conversation

@sseago
Copy link
Collaborator

@sseago sseago commented Feb 11, 2026

Thank you for contributing to Velero!

Please add a summary of your change

This adds a new volume policy action type "custom", intended to be used by external plugins which handle PVCs.

Does your change fix a particular issue?

Fixes #9505

Please indicate you've done the following:

Comment on lines +330 to +334
pv, err = kubeutil.GetPVForPVC(pvc, v.client)
if err != nil {
v.logger.WithError(err).Errorf("fail to get PV for PVC %s", pvc.Namespace+"/"+pvc.Name)
return false, err
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will check later if this is ok. There's some areas that this need to not error for the new pending/lost PVC volume policy feature

@sseago sseago force-pushed the custom-volume-policy branch from accd26e to b6dafe8 Compare February 11, 2026 22:58
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 10.11236% with 80 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.63%. Comparing base (bca6afa) to head (efbc391).

Files with missing lines Patch % Lines
internal/volumehelper/volume_policy_helper.go 4.61% 62 Missing ⚠️
.../plugin/utils/volumehelper/volume_policy_helper.go 0.00% 17 Missing ⚠️
pkg/backup/actions/csi/pvc_action.go 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9540      +/-   ##
==========================================
- Coverage   60.76%   60.63%   -0.14%     
==========================================
  Files         387      387              
  Lines       36612    36683      +71     
==========================================
- Hits        22248    22242       -6     
- Misses      12769    12847      +78     
+ Partials     1595     1594       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

sseago and others added 3 commits March 6, 2026 11:33
@sseago sseago force-pushed the custom-volume-policy branch from ef8ffdb to 3b44ac7 Compare March 6, 2026 21:48
@sseago sseago marked this pull request as ready for review March 6, 2026 21:48
@github-actions github-actions bot requested review from Lyndon-Li and kaovilai March 6, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom volume policy action support (to be implemented by external plugins)

3 participants